<?php

namespace app\index\controller;
use think\facade\Hook;

use protobuf\GPBMetadata\Person as metePerson;
use protobuf\Proto\Person;

class Protobuf
{
    public function index()
    {
        $person = new Person();
        $person->setName("zuimeng");
        $person->setAge(26);
        $data = $person->serializeToString();
        return file_put_contents('/public/protobuf/data.bin', $data);
    }

}
